To delete a node with two children, we replace its value with itsin-order successor(the smallest key in its right subtree), and then delete the successor node.